<script>
$(document).ready(function(){    
  $('#dangnhap').on('click',function(){
    //window.location='';
    window.location = '<?php echo base_url('mobile/register');?>';
  })  
});
</script>				
<h1>Login</h1>
<form method="post" action="<?php echo base_url();?>mobile/login"  data-ajax="false">  
<ul data-role="listview" data-inset="true">
 
    <li data-icon="false"><a href="#">
        <label for="username">Username*:
            <?php 
            echo form_error('username'); 
            if($this->session->userdata('loidn'))
            {
                echo '<p class="error">'.$this->session->userdata('loidn').'</p>';
                $this->session->unset_userdata('loidn');
            }
            ?>
        </label>
            <input name="username" id="name2" value="<?php echo set_value('username'); ?>" data-clear-btn="true" type="text"/>
            </a>
    </li>
    <li data-icon="false">
        <a href="#">
            <label for="password">Password*:<?php echo form_error('password');?></label>
            <input name="password" id="password" value="<?php echo set_value('password'); ?>" autocomplete="off" type="password"  data-clear-btn="true"/>
        </a>
    </li>
    <li data-icon="false">
        <a href="#">                        
        <fieldset data-role="controlgroup" >                    
            <input name="checkbox-1a" id="checkbox-1a" checked="" type="checkbox"/>
            <label style="background: #fff;" for="checkbox-1a">Remember me</label>                            
        </fieldset>                        
        </a>
    </li>
    
    <li data-icon="false" style="background:#F6F6F6 !important;">                                        
           
            <fieldset class="ui-grid-a">
                <div class="ui-block-a"><input value="Login" data-theme="c" type="submit"/></div>
                <div class="ui-block-b"><input id="dangnhap"  value="Register" data-theme="d" type="reset"/></div>
            </fieldset>                                                   
       
    </li>
    
</ul>
</form> 
		